package com.penglecode.dp.behavioral.strategy;

public class StrategyTest {

	public static void main(String[] args) {
		double orginalPrice = 100;
		DiscountStrategy discount = null;
		DiscountContext dc = new DiscountContext(discount);
		double price = dc.getDiscountPrice(orginalPrice);
		System.out.println(">>> after discount, price = " + price);
		discount = new VipMemberDiscount();
		dc.changeStrategy(discount);
		System.out.println(">>> after discount, price = " + price);
	}

}
